home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 6
/
FM Towns Free Software Collection 6.iso
/
t_os
/
algernon
/
vil_vwm.bas
< prev
Wrap
BASIC Source File
|
1993-07-08
|
25KB
|
524 lines
45030 *VIL_VWM_VER
45035 VIL_VER=100
45040 RETURN
45080 *VIL_VWM_INITM
45155 VIL_VWAT=0:VIL_VWT$=""
45160 VIL_VWXM= 8:VIL_VWYM= 14
45165 VIL_VWWM=631:VIL_VWZM=471
45170 VIL_VWXL= 32:VIL_VWYL= 8
45175 VIL_VWWL=624:VIL_VWZL=458
45180 VIL_VWXD= 1:VIL_VWYD= 1
45185 VIL_VWWD= 1:VIL_VWZD= 1
45190 VIL_VWN=0
45195 VIL_VWMR=0
45200 DIM VIL_VWX(VIL_W0),VIL_VWY(VIL_W0)
45205 DIM VIL_VWW(VIL_W0),VIL_VWZ(VIL_W0)
45210 DIM VIL_VWAT(VIL_WANMAX)
45215 DIM VIL_VWT$(VIL_WANMAX)
45220 DIM VIL_VWN(VIL_WANMAX)
45225 VIL_VWCB=VIL_W4
45230 VIL_MCX0=1:VIL_MCY0=2
45235 VIL_MCA0$=CHR$(&H7F,&HFF,&H3F,&HFF,&H1F,&HFF,&H0F,&HFF,&H07,&HFF,&H03,&HFF,&H01,&HFF,&H00,&HFF,&H00,&H7F,&H00,&H3F,&H00,&H1F,&H00,&HFF,&H00,&HFF,&H18,&H7F,&H38,&H7F,&HFC,&H7F)
45240 VIL_MCD0$=CHR$(&H00,&H00,&H00,&H00,&H40,&H00,&H20,&H00,&H50,&H00,&H38,&H00,&H5C,&H00,&H2E,&H00,&H5F,&H00,&H2F,&H80,&H5E,&H00,&H26,&H00,&H42,&H00,&H03,&H00,&H01,&H00,&H00,&H00)
45245 VIL_MCX1=7: VIL_MCY1=9
45250 VIL_MCA1$=CHR$(&HFE,&H7F,&HF0,&H0F,&HE0,&H07,&HE0,&H01,&H80,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H80,&H00,&H80,&H00,&HC0,&H01,&HC0,&H01,&HE0,&H03,&HF0,&H07,&HFC,&H1F)
45255 VIL_MCD1$=CHR$(&H00,&H00,&H01,&H80,&H0D,&HB0,&H0D,&HB0,&H0D,&HB6,&H6D,&HB6,&H6F,&HF6,&H7F,&HFE,&H7F,&HFE,&H3F,&HFE,&H3F,&HFE,&H1F,&HFC,&H1F,&HFC,&H0F,&HF8,&H03,&HE0,&H00,&H00)
45260 VIL_MCX2=2:VIL_MCY2=12
45265 VIL_MCA2$=CHR$(&HFF,&HE7,&HFF,&H83,&HFE,&H01,&HF8,&H01,&HE0,&H21,&HC0,&H63,&H81,&HC3,&H07,&HC7,&H0F,&H87,&H0F,&H8F,&H0F,&H0F,&H9F,&H1F,&HF0,&H1F,&HE0,&H3F,&HF0,&H7F,&HF0,&HFF)
45270 VIL_MCD2$=CHR$(&H00,&H00,&H00,&H18,&H00,&H7C,&H01,&H8C,&H06,&H08,&H18,&H08,&H20,&H10,&H40,&H10,&H40,&H20,&H40,&H20,&H40,&H40,&H00,&H40,&H00,&H80,&H0F,&H00,&H00,&H00,&H00,&H00)
45280 VIL_WUB=14:VIL_WDB=8:VIL_WRB=8:VIL_WLB=8
45290 PALETTE 1,[VIL_W1-80+(VIL_W1<80)*(VIL_W1-80) ,VIL_W2-80+(VIL_W2<80)*(VIL_W2-80) ,VIL_W3-80+(VIL_W3<80)*(VIL_W3-80)],1
45295 PALETTE 2,[VIL_W1 ,VIL_W2 ,VIL_W3 ]
45300 PALETTE 3,[VIL_W1+80+(255<VIL_W1)*(VIL_W1-255) ,VIL_W2+80+(255<VIL_W2)*(VIL_W2-255) ,VIL_W3+80+(255<VIL_W3)*(VIL_W3-255)],1
45305 PALETTE VIL_VWCB,[VIL_W5,VIL_W6,VIL_W7]
45310 MOUSE 2,VIL_MCA0$,VIL_MCD0$,VIL_MCX0,VIL_MCY0
45320 RETURN
45330 *VIL_VWOPEN
45480 GOSUB *VIL_WPMA
45485 IF VIL_WAN THEN
45490 LINE(VIL_WX(VIL_WAN)+16,VIL_WY(VIL_WAN)-11) -(VIL_WW(VIL_WAN)-16,VIL_WY(VIL_WAN)- 4),XOR,%3,BF
45495 ENDIF
45500 IF VIL_VWN THEN
45505 VIL_WX=VIL_VWX(VIL_VWN):VIL_WY=VIL_VWY(VIL_VWN)
45510 VIL_WW=VIL_VWW(VIL_VWN):VIL_WZ=VIL_VWZ(VIL_VWN)
45515 ENDIF
45520 GOSUB *VIL_WOP
45525 IF VIL_E THEN
45530 LINE(VIL_WX(VIL_WAN)+16,VIL_WY(VIL_WAN)-11) -(VIL_WW(VIL_WAN)-16,VIL_WY(VIL_WAN)- 4),XOR,%3,BF
45535 ENDIF
45545 VIL_VWAT(VIL_WAN)=VIL_VWAT
45550 VIL_VWT$(VIL_WAN)=VIL_VWT$
45555 VIL_VWN (VIL_WAN)=VIL_VWN
45565 LINE(VIL_WX-8,VIL_WY-14)-(VIL_WW+8,VIL_WZ+8),PSET,%VIL_VWCB,BF
45575 LINE(VIL_WX-5,VIL_WY-11)-(VIL_WW+5,VIL_WY-3),PSET,%2,BF
45580 LINE(VIL_WX-5,VIL_WZ+ 3)-(VIL_WW+5,VIL_WZ+5),PSET,%2,BF
45585 LINE(VIL_WX-5,VIL_WY- 2)-(VIL_WX-1,VIL_WZ+2),PSET,%2,BF
45590 LINE(VIL_WW+1,VIL_WY- 2)-(VIL_WW+5,VIL_WZ+2),PSET,%2,BF
45600 CONNECT(VIL_WW+7,VIL_WY-13)-(VIL_WX-7,VIL_WY-13) -(VIL_WX-7,VIL_WZ+ 7),%3
45605 CONNECT(VIL_WW+6,VIL_WY-12)-(VIL_WX-6,VIL_WY-12) -(VIL_WX-6,VIL_WZ+ 6),%3
45610 CONNECT(VIL_WX-6,VIL_WZ+ 7)-(VIL_WW+7,VIL_WZ+ 7) -(VIL_WW+7,VIL_WY-12),%1
45615 CONNECT(VIL_WX-5,VIL_WZ+ 6)-(VIL_WW+6,VIL_WZ+ 6) -(VIL_WW+6,VIL_WY-11),%1
45625 CONNECT(VIL_WW+1,VIL_WY-2)-(VIL_WX-2,VIL_WY-2) -(VIL_WX-2,VIL_WZ+1),%1
45630 CONNECT(VIL_WW ,VIL_WY-1)-(VIL_WX-1,VIL_WY-1) -(VIL_WX-1,VIL_WZ ),%1
45635 CONNECT(VIL_WX-2,VIL_WZ+2)-(VIL_WW+2,VIL_WZ+2) -(VIL_WW+2,VIL_WY-2),%3
45640 CONNECT(VIL_WX-1,VIL_WZ+1)-(VIL_WW+1,VIL_WZ+1) -(VIL_WW+1,VIL_WY-1),%3
45650 IF (VIL_VWAT AND 2)=2 THEN
45655 LINE(VIL_WX-5,VIL_WY-11)-(VIL_WX+3,VIL_WY-3),PSET,%1,B
45660 LINE(VIL_WX-5,VIL_WY-11)-(VIL_WX+3,VIL_WY-3),PSET,%1
45665 LINE(VIL_WX+3,VIL_WY-11)-(VIL_WX-5,VIL_WY-3),PSET,%1
45670 ENDIF
45680 IF (VIL_VWAT AND 4)=4 THEN
45685 LINE(VIL_WX+ 5,VIL_WY-11)-(VIL_WX+13,VIL_WY-3),PSET,%1,B
45690 LINE(VIL_WX+13,VIL_WY-11)-(VIL_WX+ 5,VIL_WY-3),PSET,%1
45695 ENDIF
45705 IF (VIL_VWAT AND 1)=1 THEN
45710 LINE(VIL_WW-13,VIL_WY-11)-(VIL_WW-5,VIL_WY- 3),PSET,%1,B
45715 LINE(VIL_WW-13,VIL_WY- 8)-(VIL_WW-5,VIL_WY- 8),PSET,%1
45720 LINE(VIL_WW-13,VIL_WY- 6)-(VIL_WW-5,VIL_WY- 6),PSET,%1
45725 ENDIF
45735 IF (VIL_VWAT AND 16)=16 THEN
45740 LINE(VIL_WW-3,VIL_WY-11)-(VIL_WW+5,VIL_WY-3),PSET,%1,B
45745 LINE(VIL_WW-3,VIL_WY- 8)-(VIL_WW+2,VIL_WY-3),PSET,%1,B
45750 ENDIF
45760 VIL_W0=INT(VIL_WW-VIL_WX-36)/5
45765 IF VIL_W0>0 THEN
45770 SYMBOL(VIL_WX+18,VIL_WY-10),LEFT$(VIL_VWT$,VIL_W0),.5!,.5!,%1,,,,1
45775 ENDIF
45785 LINE(VIL_WX+16,VIL_WY-11)-(VIL_WW-16,VIL_WY-4),XOR,%3,BF
45790 GOSUB *VIL_WPMR
45795 RETURN
45805 *VIL_VWCLOSE
45890 IF VIL_VWN THEN
45895 VIL_VWX(VIL_VWN)=VIL_WX:VIL_VWY(VIL_VWN)=VIL_WY
45900 VIL_VWW(VIL_VWN)=VIL_WW:VIL_VWZ(VIL_VWN)=VIL_WZ
45905 ENDIF
45910 GOSUB *VIL_WCL
45915 VIL_VWAT=VIL_VWAT(VIL_WAN)
45920 VIL_VWT$=VIL_VWT$(VIL_WAN)
45925 VIL_VWN =VIL_VWN (VIL_WAN)
45930 IF VIL_WAN THEN
45935 LINE(VIL_WX+16,VIL_WY-11)-(VIL_WW-16,VIL_WY-4),XOR,%3,BF
45940 ENDIF
45945 GOSUB *VIL_WPMR
45950 RETURN
45960 *VIL_VWCLOSEDMY
46045 IF VIL_VWN THEN
46050 VIL_VWX(VIL_VWN)=VIL_WX:VIL_VWY(VIL_VWN)=VIL_WY
46055 VIL_VWW(VIL_VWN)=VIL_WW:VIL_VWZ(VIL_VWN)=VIL_WZ
46060 ENDIF
46065 GOSUB *VIL_WCLDMY
46070 LINE(VIL_WX(VIL_WAN+1)+16,VIL_WY(VIL_WAN+1)-11) -(VIL_WW(VIL_WAN+1)-16,VIL_WY(VIL_WAN+1)- 4),XOR,%3,BF
46075 VIL_VWAT=VIL_VWAT(VIL_WAN)
46080 VIL_VWT$=VIL_VWT$(VIL_WAN)
46085 VIL_VWN =VIL_VWN (VIL_WAN)
46090 IF VIL_WAN THEN
46095 LINE(VIL_WX+16,VIL_WY-11)-(VIL_WW-16,VIL_WY-4),XOR,%3,BF
46100 ENDIF
46105 GOSUB *VIL_WPMR
46110 RETURN
46120 *VIL_VWCLOSEALL
46160 GOSUB *VIL_WCLALL
46165 RETURN
46175 *VIL_VWCLS
46210 LINE(0,0)-(VIL_WW-VIL_WX,VIL_WZ-VIL_WY),PSET,%VIL_VWCB,BF
46215 RETURN
46225 *VIL_VWMCHECK
46315 VIL_VWMR=0
46320 IF VIL_KN=-1 THEN
46325 GOSUB *VIL_VWMWIN
46330 ELSE IF VIL_KN=-2 AND VIL_KY=27 THEN
46335 VIL_WX=VIL_WW+(VIL_WW-582)*(VIL_WW>582)
46340 VIL_WY=VIL_WY-32+(VIL_WY- 46)*(VIL_WY< 46) +(VIL_WY-406)*(VIL_WY>406)
46350 GOSUB *VIL_VWMMENU
46355 ENDIF
46360 RETURN
46370 *VIL_VWMWIN
46430 VIL_VWMR=0
46435 IF (VIL_VWAT AND 2)=2 AND VIL_WX- 6<VIL_MX AND VIL_MX<VIL_WX+4 AND VIL_WY-12<VIL_MY AND VIL_MY<VIL_WY-2 THEN
46440 GOSUB *VIL_VWMCLOSE
46445 ELSE IF (VIL_VWAT AND 4)= 4 AND VIL_WX+4<VIL_MX AND VIL_MX<VIL_WX+14 AND VIL_WY-12<VIL_MY AND VIL_MY<VIL_WY-2 THEN
46450 GOSUB *VIL_VWMHIDE
46455 ELSE IF (VIL_VWAT AND 1)= 1 AND VIL_WW-14<VIL_MX AND VIL_MX<VIL_WW-4 AND VIL_WY-12<VIL_MY AND VIL_MY<VIL_WY-2 THEN
46460 VIL_WX=VIL_WW+(VIL_WW-582)*(VIL_WW>582)
46465 VIL_WY=VIL_WY-32+(VIL_WY- 46)*(VIL_WY< 46) +(VIL_WY-406)*(VIL_WY>406)
46475 GOSUB *VIL_VWMMENU
46480 ELSE IF (VIL_VWAT AND 16)=16 AND VIL_WW-4<VIL_MX AND VIL_MX<VIL_WW+6 AND VIL_WY-12<VIL_MY AND VIL_MY<VIL_WY-2 THEN
46485 GOSUB *VIL_VWMRESIZE
46490 ELSE IF (VIL_VWAT AND 8)= 8 AND VIL_WX- 6<VIL_MX AND VIL_MX<VIL_WW+6 AND VIL_WY-12<VIL_MY AND VIL_MY<VIL_WY-2 THEN
46495 GOSUB *VIL_VWMMOVE
46500 ENDIF
46505 RETURN
46515 *VIL_VWMMENU
46585 GOSUB *VIL_WPMA
46590 LINE(VIL_WX(VIL_WAN)+16,VIL_WY(VIL_WAN)-11) -(VIL_WW(VIL_WAN)-16,VIL_WY(VIL_WAN)- 4),XOR,%3,BF
46595 VIL_W1=VIL_VWAT
46600 VIL_WW=VIL_WX+49:VIL_WZ=VIL_WY+98
46605 VIL_VWT$="VWM":VIL_VWAT=0:VIL_VWN=0
46610 GOSUB *VIL_VWOPEN
46615 SYMBOL(5, 0),"<VWM>", 1,1,6
46620 SYMBOL(1, 20),"CLOSE", 1,1,%1-((VIL_W1 AND 2)= 2)*2
46625 SYMBOL(1, 36),"HIDE", 1,1,%1-((VIL_W1 AND 4)= 4)*2
46630 SYMBOL(1, 52),"MOVE", 1,1,%1-((VIL_W1 AND 8)= 8)*2
46635 SYMBOL(1, 68),"RESIZE",1,1,%1-((VIL_W1 AND 16)=16)*2
46640 SYMBOL(1, 84),"<INFO>",1,1,%3
46650 VIL_X=1:VIL_Y=20:VIL_W=VIL_X+47:VIL_Z=VIL_Y+14
46655 VIL_YL=16:VIL_XN=1:VIL_YN=5:VIL_BXDIR=0:VIL_BCE=0:VIL_C=15:VIL_MN=1
46660 GOSUB *VIL_MSEL
46665 IF VIL_KN=-1 OR (0<VIL_KN AND VIL_KN<5 AND (VIL_VWAT(VIL_WAN-1) AND 2^VIL_KN)=0) THEN 46660
46670 GOSUB *VIL_VWCLOSE
46675 GOSUB *VIL_WPMA
46680 LINE(VIL_WX(VIL_WAN)+16,VIL_WY(VIL_WAN)-11) -(VIL_WW(VIL_WAN)-16,VIL_WY(VIL_WAN)- 4),XOR,%3,BF
46685 GOSUB *VIL_WPMR
46690 IF VIL_KN<1 THEN RETURN
46700 ON VIL_KN GOTO 46710,46725,46740,46780,46820
46710 GOSUB *VIL_VWMCLOSE
46715 RETURN
46725 IF VIL_KY THEN GOSUB *VIL_VWMKHIDE ELSE GOSUB *VIL_VWMHIDE
46730 RETURN
46740 IF VIL_KY THEN
46745 GOSUB *VIL_VWMKMOVE
46750 ELSE
46755 VIL_MX=(VIL_WX+VIL_WW)\2:VIL_MY=VIL_WY-4:MOUSE 1,VIL_MX,VIL_MY
46760 GOSUB *VIL_VWMMOVE
46765 ENDIF
46770 RETURN
46780 IF VIL_KY THEN
46785 GOSUB *VIL_VWMKRESIZE
46790 ELSE
46795 VIL_MX=VIL_WW:VIL_MY=VIL_WY-6:MOUSE 1,VIL_MX,VIL_MY
46800 GOSUB *VIL_VWMRESIZE
46805 ENDIF
46810 RETURN
46820 VIL_WX=VIL_WX+(VIL_WX-448)*(VIL_WX>448)
46825 VIL_WY=VIL_WY+(VIL_WY-380)*(VIL_WY>380)
46830 GOSUB *VIL_VWMINF
46835 RETURN
46845 *VIL_VWMINF
46885 VIL_WW=VIL_WX+183:VIL_WZ=VIL_WY+91
46890 VIL_VWT$="VWM INFORMATION":VIL_VWAT=0:VIL_VWN=0
46895 VIL_E=0
46900 GOSUB *VIL_VWOPEN
46905 IF VIL_E=0 THEN
46910 VIL_W0$=FNVIL_P2S0$(VIL_WX(VIL_WAN-1),3)+"," +FNVIL_P2S0$(VIL_WY(VIL_WAN-1),3)+")"
46915 SYMBOL(8, 8),"POSITION:("+VIL_W0$,1,1,4
46920 VIL_W0$=FNVIL_P2S0$(VIL_WW(VIL_WAN-1)-VIL_WX(VIL_WAN-1)+1,3)+"×" +FNVIL_P2S0$(VIL_WZ(VIL_WAN-1)-VIL_WY(VIL_WAN-1)+1,3)
46925 SYMBOL(8,28),"SIZE : "+VIL_W0$,1,1,4
46930 VIL_W0$=FNVIL_P2S0$(VIL_WAN-1,3)+"/"+FNVIL_P2S0$(VIL_WANMAX,3)
46935 SYMBOL(8,48),"WINDOW : "+VIL_W0$,1,1,4
46940 VIL_W0$=FNVIL_P2S0$((VIL_WBUFMAX-VIL_WBUFO(VIL_WAN-1))\512,4)+"K/" +FNVIL_P2S0$(VIL_WBUFMAX\512,4)+"K"
46945 SYMBOL(8,68),"FREE : "+VIL_W0$,1,1,4
46950 GOSUB *VIL_MVWAIT
46955 GOSUB *VIL_VWCLOSE
46960 ENDIF
46965 RETURN
46975 *VIL_VWMMOVE
47045 MOUSE 2,VIL_MCA1$,VIL_MCD1$,VIL_MCX1,VIL_MCY1
47050 MOUSE 1,VIL_MX,VIL_MY,1
47055 VIL_W0=VIL_WPM:GOSUB *VIL_WPMA
47060 VIL_WX=VIL_WX-8:VIL_WY=VIL_WY-14:VIL_WW=VIL_WW+8:VIL_WZ=VIL_WZ+8
47065 MOUSE 4,VIL_VWXM+VIL_MX-VIL_WX-8,VIL_VWYM+VIL_MY-VIL_WY-14, VIL_VWWM+VIL_MX-VIL_WW+8,VIL_VWZM+VIL_MY-VIL_WZ+8
47070 VIL_W1=0:VIL_W2=0:VIL_W3=0:VIL_W4=0
47075 VIL_WW=VIL_WW-VIL_WX:VIL_WZ=VIL_WZ-VIL_WY
47080 LINE(VIL_WX,VIL_WY)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47085 WHILE MOUSE(2,0)
47090 VIL_MX=MOUSE(9):VIL_MY=MOUSE(10)
47095 IF VIL_MX OR VIL_MY THEN
47100 LINE(VIL_WX+VIL_W3,VIL_WY+VIL_W4)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47105 VIL_W1=VIL_W1+VIL_MX:VIL_W2=VIL_W2+VIL_MY
47110 VIL_W3=VIL_W1-VIL_W1 MOD VIL_VWXD
47115 VIL_W4=VIL_W2-VIL_W2 MOD VIL_VWYD
47120 LINE(VIL_WX+VIL_W3,VIL_WY+VIL_W4)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47125 ENDIF
47130 WEND
47135 VIL_WX=VIL_WX+VIL_W3:VIL_WY=VIL_WY+VIL_W4
47140 LINE(VIL_WX,VIL_WY)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47150 IF MOUSE(2,1) THEN
47155 VIL_WX=VIL_WX(VIL_WAN):VIL_WY=VIL_WY(VIL_WAN)
47160 VIL_WW=VIL_WW(VIL_WAN):VIL_WZ=VIL_WZ(VIL_WAN)
47165 ELSE
47170 VIL_WX=VIL_WX+8:VIL_WY=VIL_WY+14
47180 GOSUB *VIL_VWMMV
47185 ENDIF
47190 MOUSE 2,VIL_MCA0$,VIL_MCD0$,VIL_MCX0,VIL_MCY0
47195 MOUSE 4,0,0,639,479
47200 IF VIL_W0 THEN GOSUB *VIL_WPMR
47205 RETURN
47215 *VIL_VWMKMOVE
47275 WHILE INKEY$<>"":WEND
47280 VIL_W0=VIL_WPM:GOSUB *VIL_WPMA
47285 VIL_WX=VIL_WX-8:VIL_WY=VIL_WY-14
47290 VIL_WW=VIL_WW-VIL_WX+8:VIL_WZ=VIL_WZ-VIL_WY+8
47295 LINE(VIL_WX,VIL_WY)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47300 VIL_KY=0
47305 WHILE VIL_KY<>13 AND VIL_KY<>24 AND VIL_KY<>48
47310 VIL_K$=INKEY$:IF VIL_K$="" THEN 47310
47315 LINE(VIL_WX,VIL_WY)-STEP(VIL_WW,VIL_WZ),XOR,7,B
47320 VIL_KY=ASC(VIL_K$)
47325 VIL_WX=VIL_WX+((VIL_KY=29)-(VIL_KY=28))*VIL_VWXD
47330 VIL_WX=VIL_WX-((VIL_WX+8<VIL_VWXM)-(VIL_VWWM<VIL_WX+VIL_WW-8)) *VIL_VWXD
47335 VIL_WX=VIL_WX+((VIL_KY=52 OR VIL_KY=22)-(VIL_KY=54 OR VIL_KY=23)) *VIL_VWXD*8
47340 VIL_WX=VIL_WX-((VIL_WX+8<VIL_VWXM)-(VIL_VWWM<VIL_WX+VIL_WW-8)) *VIL_VWXD*8
47350 VIL_WY=VIL_WY+((VIL_KY=30)-(VIL_KY=31))*VIL_VWYD
47355 VIL_WY=VIL_WY-((VIL_WY+14<VIL_VWYM)-(VIL_VWZM<VIL_WY+VIL_WZ-8)) *VIL_VWYD
47360 V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IL_WX(VIL_WAN)=VIL_WX:VIL_WY(VIL_WAN)=VIL_WY
47560 VIL_WW(VIL_WAN)=VIL_WW:VIL_WZ(VIL_WAN)=VIL_WZ
47565 VIL_VWMR=8
47570 ELSE
47575 VIL_WX=VIL_WX(VIL_WAN):VIL_WY=VIL_WY(VIL_WAN)
47580 VIL_VWMR=0
47585 ENDIF
47590 RETURN
47600 *VIL_VWMCLOSE
47640 GOSUB *VIL_VWCLOSE
47645 VIL_VWMR=2
47650 RETURN
47660 *VIL_VWMHIDE
47715 VIL_W0=VIL_WPM:GOSUB *VIL_WPMA
47720 GOSUB *VIL_VWMHD0
47725 IF VIL_E=0 THEN
47730 WHILE MOUSE(2,0):WEND
47735 GOSUB *VIL_VWMHD1
47740 VIL_VWMR=4
47745 ELSE
47750 VIL_VWMR=0
47755 ENDIF
47760 IF VIL_W0 THEN GOSUB *VIL_WPMR
47765 RETURN
47775 *VIL_VWMKHIDE
47830 WHILE INKEY$<>"":WEND
47835 VIL_W0=VIL_WPM:GOSUB *VIL_WPMA
47840 GOSUB *VIL_VWMHD0
47845 IF VIL_E=0 THEN
47850 WHILE INKEY$="":WEND
47855 GOSUB *VIL_VWMHD1
47860 VIL_VWMR=4
47865 ENDIF
47870 IF VIL_W0 THEN GOSUB *VIL_WPMR
47875 RETURN
47885 *VIL_VWMHD0
47930 VIL_E=0
47935 GET@A(VIL_WX(VIL_WAN)-8,VIL_WY(VIL_WAN)-14) -(VIL_WW(VIL_WAN)+8,VIL_WZ(VIL_WAN)+ 8) ,VIL_WBUF%,VIL_WBUFO(VIL_WAN)
47940 IF VIL_E=0 THEN
47945 PUT@A(VIL_WX(VIL_WAN)-8,VIL_WY(VIL_WAN)-14) -(VIL_WW(VIL_WAN)+8,VIL_WZ(VIL_WAN)+ 8) ,VIL_WBUF%,,,,,VIL_WBUFO(VIL_WAN-1)
47950 ENDIF
47955 RETURN
47965 *VIL_VWMHD1
48005 PUT@A(VIL_WX(VIL_WAN)-8,VIL_WY(VIL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_MX<=VIL_WX(VIL_WAN)-8 THEN
48265 VIL_WX=VIL_MX+(VIL_WX-VIL_MX) MOD VIL_VWWD
48270 VIL_WW=VIL_WW(VIL_WAN)+8:VIL_W1=1
48275 ELSE IF VIL_MX>=VIL_WW(VIL_WAN)+8 THEN
48280 VIL_WW=VIL_MX-(VIL_MX-VIL_WW) MOD VIL_VWWD
48285 VIL_WX=VIL_WX(VIL_WAN)-8:VIL_W1=2
48290 ELSE
48295 IF VIL_W1=1 THEN
48300 VIL_W3=VIL_WW-VIL_VWXL-15-VIL_MX
48305 VIL_W3=VIL_MX-VIL_W3*(VIL_W3<0)
48310 VIL_WX=VIL_W3+(VIL_WX-VIL_W3) MOD VIL_VWWD
48315 ELSE
48320 VIL_W3=VIL_WX+VIL_VWXL+15-VIL_MX
48325 VIL_W3=VIL_MX-VIL_W3*(VIL_W3>0)
48330 VIL_WW=VIL_W3-(VIL_W3-VIL_WW) MOD VIL_VWWD
48335 ENDIF
48340 ENDIF
48350 IF VIL_MY<=VIL_WY(VIL_WAN)-14 THEN
48355 VIL_WY=VIL_MY+(VIL_WY-VIL_MY) MOD VIL_VWZD
48360 VIL_WZ=VIL_WZ(VIL_WAN)+8:VIL_W2=1
48365 ELSE IF VIL_MY>=VIL_WZ(VIL_WAN)+8 THEN
48370 VIL_WZ=VIL_MY-(VIL_MY-VIL_WZ) MOD VIL_VWZD
48375 VIL_WY=VIL_WY(VIL_WAN)-14:VIL_W2=2
48380 ELSE
48385 IF VIL_W2=1 THEN
48390 VIL_W3=VIL_WZ-VIL_VWYL-21-VIL_MY
48395 VIL_W3=VIL_MY-VIL_W3*(VIL_W3<0)
48400 VIL_WY=VIL_W3+(VIL_WY-VIL_W3) MOD VIL_VWZD
48405 ELSE
48410 VIL_W3=VIL_WY+VIL_VWYL+21-VIL_MY
48415 VIL_W3=VIL_MY-VIL_W3*(VIL_W3>0)
48420 VIL_WZ=VIL_W3-(VIL_W3-VIL_WZ) MOD VIL_VWZD
48425 ENDIF
48430 ENDIF
48435 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48440 ENDIF
48445 WEND
48450 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48455 IF MOUSE(2,1) THEN
48460 VIL_WX=VIL_WX(VIL_WAN):VIL_WY=VIL_WY(VIL_WAN)
48465 VIL_WW=VIL_WW(VIL_WAN):VIL_WZ=VIL_WZ(VIL_WAN)
48470 ELSE
48475 VIL_WX=VIL_WX+8:VIL_WY=VIL_WY+14:VIL_WW=VIL_WW-8:VIL_WZ=VIL_WZ-8
48480 GOSUB *VIL_VWMRS
48485 ENDIF
48490 MOUSE 2,VIL_MCA0$,VIL_MCD0$,VIL_MCX0,VIL_MCY0
48495 MOUSE 4,0,0,639,479
48500 IF VIL_W0 THEN GOSUB *VIL_WPMR
48505 RETURN
48515 *VIL_VWMKRESIZE
48595 WHILE INKEY$<>"":WEND
48600 VIL_W0=VIL_WPM:GOSUB *VIL_WPMA
48620 VIL_WX=VIL_WX-8:VIL_WY=VIL_WY-14:VIL_WW=VIL_WW+8:VIL_WZ=VIL_WZ+8
48625 VIL_W3=VIL_WW-VIL_VWWL-7-VIL_VWXM:VIL_W4=VIL_WZ-VIL_VWZL- 7-VIL_VWYM
48630 VIL_W5=VIL_WX+VIL_VWWL+7-VIL_VWWM:VIL_W6=VIL_WY+VIL_VWZL+13-VIL_VWZM
48635 VIL_W3=VIL_VWXM-VIL_W3*(VIL_W3>0)-8
48640 VIL_W4=VIL_VWYM-VIL_W4*(VIL_W4>0)-14
48645 VIL_W5=VIL_VWWM-VIL_W5*(VIL_W5<0)+8
48650 VIL_W6=VIL_VWZM-VIL_W6*(VIL_W6<0)+8
48670 VIL_W1=2:VIL_W2=1
48675 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48680 VIL_KY=0
48685 WHILE VIL_KY<>13 AND VIL_KY<>24 AND VIL_KY<>48
48690 VIL_K$=INKEY$:IF VIL_K$="" THEN 48690
48695 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48700 VIL_KY=ASC(VIL_K$)
48705 VIL_W7=((VIL_KY=29)-(VIL_KY=28))*VIL_VWWD +((VIL_KY=52 OR VIL_KY=22)-(VIL_KY=54 OR VIL_KY=23))*VIL_VWWD*8
48715 IF VIL_W1=1 THEN
48720 VIL_WX=VIL_WX+VIL_W7
48725 IF VIL_WX<VIL_W3 THEN
48730 VIL_WW=VIL_W5-(VIL_W5-VIL_WW) MOD VIL_VWWD
48735 VIL_WX=VIL_WX(VIL_WAN)-8:VIL_W1=2
48740 ELSE IF VIL_WW-VIL_VWXL-15<VIL_WX THEN
48745 VIL_WX=VIL_WX(VIL_WAN)-8:VIL_W1=2
48750 VIL_WW=VIL_WX+VIL_VWXL+15 +(VIL_WW-VIL_WX-VIL_VWXL-15) MOD VIL_VWWD
48755 ENDIF
48760 ELSE
48765 VIL_WW=VIL_WW+VIL_W7
48770 IF VIL_WW<VIL_WX+VIL_VWXL+15 THEN
48775 VIL_WW=VIL_WW(VIL_WAN)+8:VIL_W1=1
48780 VIL_WX=VIL_WW-VIL_VWXL-15 +(VIL_WX-VIL_WW+VIL_VWXL+15) MOD VIL_VWWD
48785 ELSE IF VIL_W5<VIL_WW THEN
48790 VIL_WX=VIL_W3-(VIL_W3-VIL_WX) MOD VIL_VWWD
48795 VIL_WW=VIL_WW(VIL_WAN)+8:VIL_W1=1
48800 ENDIF
48805 ENDIF
48815 VIL_W7=((VIL_KY=30)-(VIL_KY=31))*VIL_VWZD +((VIL_KY=56 OR VIL_KY=11)-(VIL_KY=50 OR VIL_KY=127))*VIL_VWZD*8
48825 IF VIL_W2=1 THEN
48830 VIL_WY=VIL_WY+VIL_W7
48835 IF VIL_WY<VIL_W4 THEN
48840 VIL_WZ=VIL_W6-(VIL_W6-VIL_WZ) MOD VIL_VWZD
48845 VIL_WY=VIL_WY(VIL_WAN)-14:VIL_W2=2
48850 ELSE IF VIL_WZ-VIL_VWYL-21<VIL_WY THEN
48855 VIL_WY=VIL_WY(VIL_WAN)-14:VIL_W2=2
48860 VIL_WZ=VIL_WY+VIL_VWYL+21 +(VIL_WZ-VIL_WY-VIL_VWYL-21) MOD VIL_VWZD
48865 ENDIF
48870 ELSE
48875 VIL_WZ=VIL_WZ+VIL_W7
48880 IF VIL_WZ<VIL_WY+VIL_VWYL+21 THEN
48885 VIL_WZ=VIL_WZ(VIL_WAN)+8:VIL_W2=1
48890 VIL_WY=VIL_WZ-VIL_VWYL-21 +(VIL_WY-VIL_WZ+VIL_VWYL+21) MOD VIL_VWZD
48895 ELSE IF VIL_W6<VIL_WZ THEN
48900 VIL_WY=VIL_W4-(VIL_W4-VIL_WY) MOD VIL_VWZD
48905 VIL_WZ=VIL_WZ(VIL_WAN)+8:VIL_W2=1
48910 ENDIF
48915 ENDIF
48920 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48925 WEND
48935 LINE(VIL_WX,VIL_WY)-(VIL_WW,VIL_WZ),XOR,7,B
48940 IF VIL_KY=13 THEN
48945 VIL_WX=VIL_WX+8:VIL_WY=VIL_WY+14:VIL_WW=VIL_WW-8:VIL_WZ=VIL_WZ-8
48950 GOSUB *VIL_VWMRS
48955 ELSE
48960 VIL_WX=VIL_WX(VIL_WAN):VIL_WY=VIL_WY(VIL_WAN)
48965 VIL_WW=VIL_WW(VIL_WAN):VIL_WZ=VIL_WZ(VIL_WAN)
48970 ENDIF
48975 IF VIL_W0 THEN GOSUB *VIL_WPMR
48980 RETURN
48990 *VIL_VWMRS
49070 VIL_WBUFO(VIL_WAN+1)=VIL_WBUFO(VIL_WAN) +INT((INT((VIL_WW-VIL_WX+24)/8) *(VIL_WZ-VIL_WY+23)*4+1)/2)
49075 IF VIL_WBUFO(VIL_WAN+1)<VIL_WBUFO(VIL_WAN) THEN
49080 VIL_WBUFO(VIL_WAN+1)=VIL_WBUFO(VIL_WAN)
49085 ENDIF
49090 VIL_E=0
49095 GET@A(VIL_WX(VIL_WAN),VIL_WY(VIL_WAN)) -(VIL_WW(VIL_WAN),VIL_WZ(VIL_WAN)) ,VIL_WBUF%,VIL_WBUFO(VIL_WAN+1)
49100 VIL_W1=VIL_WW(VIL_WAN)-VIL_WX(VIL_WAN)
49105 VIL_W2=VIL_WZ(VIL_WAN)-VIL_WY(VIL_WAN)
49110 IF VIL_E=0 THEN
49115 VIL_WX(VIL_WAN+1)=VIL_WX:VIL_WY(VIL_WAN+1)=VIL_WY
49120 VIL_WW(VIL_WAN+1)=VIL_WW:VIL_WZ(VIL_WAN+1)=VIL_WZ
49125 GOSUB *VIL_VWCLOSE
49135 VIL_WX=VIL_WX(VIL_WAN+2):VIL_WY=VIL_WY(VIL_WAN+2)
49140 VIL_WW=VIL_WW(VIL_WAN+2):VIL_WZ=VIL_WZ(VIL_WAN+2)
49145 VIL_VWAT=VIL_VWAT(VIL_WAN+1):VIL_VWT$=VIL_VWT$(VIL_WAN+1)
49150 GOSUB *VIL_VWOPEN
49155 GOSUB *VIL_WPMR
49160 PUT@A(0,0)-(VIL_W1,VIL_W2),VIL_WBUF%,,,,,VIL_WBUFO(VIL_WAN+1)
49170 GOSUB *VIL_WPMA
49175 VIL_VWMR=16
49180 ELSE
49185 VIL_WX=VIL_WX(VIL_WAN):VIL_WY=VIL_WY(VIL_WAN)
49190 VIL_WW=VIL_WW(VIL_WAN):VIL_WZ=VIL_WZ(VIL_WAN)
49195 VIL_VWMR=0
49200 ENDIF
49205 RETURN
49235 *VIL_SEL_INITM
49285 RETURN
49295 *VIL_SEL_OK
49420 SYMBOL(VIL_X+4,VIL_Y+4),"確認",1,1,7
49425 LINE(VIL_X+ 2,VIL_Y+2)-(VIL_X+ 37,VIL_Y+21),PSET,7,B
49430 VIL_W=VIL_X+39:VIL_Z=VIL_Y+23
49435 VIL_XN=1:VIL_YN=1:VIL_C=15:VIL_MN=0:VIL_BCE=0
49440 GOSUB *VIL_MSEL
49445 GOSUB *VIL_BC
49450 RETURN
49460 *VIL_SEL_YN
49610 SYMBOL(VIL_X+4,VIL_Y+4),"はい いいえ",1,1,7
49615 LINE(VIL_X+ 2,VIL_Y+2)-(VIL_X+ 53,VIL_Y+21),PSET,7,B
49620 LINE(VIL_X+66,VIL_Y+2)-(VIL_X+117,VIL_Y+21),PSET,7,B
49625 VIL_W=VIL_X+55:VIL_Z=VIL_Y+23
49630 VIL_XL=64:VIL_XN=2:VIL_YN=1:VIL_C=15:VIL_BXDIR=0:VIL_MN=0:VIL_BCE=0
49635 GOSUB *VIL_MSEL
49640 GOSUB *VIL_BC
49645 IF VIL_KN=0 THEN VIL_KN=2
49650 RETURN
49660 *VIL_SEL_DO
49810 SYMBOL(VIL_X+4,VIL_Y+4),"実行 取消",1,1,7
49815 LINE(VIL_X+ 2,VIL_Y+2)-(VIL_X+37,VIL_Y+21),PSET,7,B
49820 LINE(VIL_X+50,VIL_Y+2)-(VIL_X+85,VIL_Y+21),PSET,7,B
49825 VIL_W=VIL_X+39:VIL_Z=VIL_Y+23
49830 VIL_XL=48:VIL_XN=2:VIL_YN=1:VIL_C=15:VIL_BXDIR=0:VIL_MN=0:VIL_BCE=0
49835 GOSUB *VIL_MSEL
49840 GOSUB *VIL_BC
49845 IF VIL_KN=0 THEN VIL_KN=2
49850 RETURN